<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:71:"/www/wwwroot/mamingwang.cn/yzf/application/admin/view/indent/index.html";i:1556448929;s:70:"/www/wwwroot/mamingwang.cn/yzf/application/admin/view/common/head.html";i:1556002984;}*/ ?>
<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>聚财国际</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/public/static/css/font.css"> 
	<link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" /> 
    <link rel="stylesheet" href="/public/static/css/xadmin.css">
    <link href="/public/static/lib/layui/css/layui.css" rel="stylesheet">
    <script type="text/javascript" src="/public/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="/public/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/public/static/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script type="text/css">
      #fff{
        border: red solid 1px;
      }
    </script>
  </head>
  
<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a >首页</a>
        <a >演示</a>
        <a>
          <cite>发布订单</cite>
        </a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="<?php echo url('admin/indent/index'); ?>" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <xblock>
        <button class="layui-btn" onclick="x_admin_show('发布订单','<?php echo url('admin/indent/insert'); ?>')"><i class="layui-icon"></i>发布订单</button>
    </xblock>
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <div class="layui-input-inline">
                <select name="cateid">
                    <option value="">选择关键词</option>
                    <option value="t_number">订单编号</option>
                    <option value="z_name">发布用户</option>
                </select>
            </div>
            <input type="text" name="key"  placeholder="填写" autocomplete="off" class="layui-input" s>

            <span>发布时间</span><input class="layui-input" placeholder="开始日" name="datemin" id="start">至
            <input class="layui-input" placeholder="截止日" name="datemax" id="end">
            <div class="layui-input-inline">
                <select name="zid">
                    <option value="">支付方式</option>
                    <option value="1">微信支付</option>
                    <option value="2">支付宝支付</option>
                    <option value="3">银行卡支付</option>
                </select>
            </div>
            <input type="submit" name="sub" class="layui-btn" value="开始搜索" lay-submit="" lay-filter="sreach">
        </form>
    </div>
    <table class="layui-table">
        <thead>
        <tr style="text-align: center">
            <th>序号NO</th>
            <th>订单编号</th>
            <th>订单价格</th>
            <th>支付方式</th>
            <th >发布人</th>
            <th>发布时间</th>
            <th>订单状态</th>
            <th style="text-align: center">操作</th>
        </tr>
        </thead>
        <tbody>
        <?php if(is_array($indent) || $indent instanceof \think\Collection || $indent instanceof \think\Paginator): $key = 0; $__LIST__ = $indent;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$b): $mod = ($key % 2 );++$key;?>
        <tr style="text-align: center">
            <td><?php echo $b['tid']; ?></td>
            <td><?php echo $b['t_number']; ?></td>
            <td><?php echo $b['t_money']; ?>元</td>
            <td><?php echo $b['z_paytype']['z_type']; ?></td>
            <td><?php echo $b['z_name']; ?></td>
            <td><?php echo $b['z_createtime']; ?></td>
            <?php if($b['sid'] == 1): ?><td style="color: green">等待匹配</td><?php elseif($b['sid'] ==2): ?><td style="color: blue">匹配成功</td><?php elseif($b['sid']==3): ?><td style="color: red;">交易成功</td><?php elseif($b['sid']==4): ?><td style="color: red;">已确认打款</td><?php elseif($b['sid']==5): ?><td style="color: red;">确认收款</td><?php elseif($b['sid']==6): ?><td style="color: red;">汇款完成</td><?php endif; ?>
            <td class="td-manage">
                <a title="修改" href="javascript:;" attr_sid='<?php echo $b['sid']; ?>' attr_id='<?php echo $b['tid']; ?>' onclick="banner_edit(this)"  class="layui-btn  layui-btn-xs layui-btn-radius layui-btn-normal">
                    <i class="layui-icon"></i><span style="color: mediumblue">修改</span>
                </a>
            </td>
        </tr>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>
    <div class="page">
        <div>
            <?php echo $page; ?>
        </div>
    </div>

</div>
<script>
    function banner_edit(obj){
        var sid=$(obj).attr('attr_sid');
        if(sid==1){

            var tid=$(obj).attr('attr_id');
            //alert(mid);
            var url="<?php echo Url('admin/indent/update'); ?>?tid="+  tid;
            // alert(url);
            x_admin_show('查看',url);
        }else{
            layer.msg('订单已被匹配，无法修改',{icon:9},1000);
        }
    }
</script>

</body>

</html>